/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ants;

import java.io.Serializable;
import java.util.ListIterator;

/**
 *
 * @author uhgy3k
 */
public class Tile implements Serializable {

    public int type;
    public int AntType[];
    public boolean food;

    Tile(Celda celda) {
        if (celda.tipo == Constantes.obstaculo) {
            Tile.this.type = Constantes.obstaculo;
        } else {
            Tile.this.type = Constantes.libre;
        }
        if (celda.comida > 0) {
            Tile.this.food = true;
        } else {
            Tile.this.food = false;
        }
        
        AntType = new int[celda.ants.size()];
        ListIterator itr = celda.ants.listIterator();
        int k = 0;
        while(itr.hasNext())
        {
            Ant ant = (Ant)itr.next();
            AntType[k] = ant.type;
            k++;
        }

    }
    
}
